home *** CD-ROM | disk | FTP | other *** search
- Path: news-feed.mci.newscorp.com!usenet
- From: pbe@pobox.com
- Newsgroups: comp.lang.c++,comp.lang.pascal.delphi.misc
- Subject: Re: C++ with Zapp vs. Delphi
- Date: 23 Jan 1996 02:47:14 GMT
- Organization: Phoenix Business Enterprises
- Message-ID: <4e1i7i$v29@klein.delphi.com>
- References: <4coar6$d4n@sun4.bham.ac.uk> <4coip7$69s@news1.usa.pipeline.com> <DBk8wg2yqjbB083yn@iaccess.za> <4d7pmb$48c8@tigger.cc.uic.edu> <4dk38h$gdr@merlin.delphi.com> <4dksp1$3d6c@tigger.cc.uic.edu> <30fe666e.3349285@130.15.126.54> <4dmjt8$6sv@crc-news.doc.ca> <30ff9519.1799465@130.15.126.54> <4doe07$4u8@crc-news.doc.ca>
- NNTP-Posting-Host: 206.15.161.89
- X-To: Slobodan Celenkovic <slobodan@cs.unh.edu>
- X-Mailer: SQUID
- X-Registration: $737961
-
- >>No, you end up with the same number of classes. *You* need to write a
- >>separate class for each item to be put into the list. *I* need to
- >>write a separate class for each kind of list. I don't need to put
- >>sorting information into items; sorting is what the list does.
- >
- >Sorting algorithm is still in the list class (binary search, quick sort,
- >. .). However the item comparison shouldn't go into the list class, but
- >item classes. Why? Because items "know" how to compare themselves to
- >other items. Once again see Booch.
-
- Yes, and this can be done with Delphi (TSTRINGS TSTRINGS TSTRINGS
- TSTRINGS) The SORT method would be in the list, IT would use COMPARE, but
- since compare would be OVERRIDEN, the List's Sort would use the Item's
- compare.
-
- Ie, You write SORT once! just define Compare as an abstract so you know
- it's IMPLEMENTATION.
-
- >Yes, but whenever the item classes change you must go back and change the
- >list class. This is exactly what should be avoided. So if you got the
-
- No. Only create a new descendent.
-
- >list class from a vendor in a library you should be able to create new
- >item classes and store them in the list without making any changes to the
- >list class. This is ideally what we'd want (at least I would). Once you
-
- As you can do in Delphi.
-
- >implement the list you shouldn't have to go back and change it. So the
- >sort method should sort an abstract item class without having to know
- >details of item comparison. Again because items change the list must be
- >insulated from item internals, including the comparison code.
-
- YES YES YES! Delphi CAN do this!
-
- >2) OO way using MI (#1)
-
- OO using Abstract Objects and Polymorphism.
-
- _
- You've got a fiend in Pennsylvania.
-
- +------------------------------------------------------------+
- |* Chad Z. Hower - phoenix@pobox.com |
- |* Consultant - Phoenix Business Enterprises |
- | pbe@pobox.com - http://pobox.com/~pbe |
- |* Principal Analyst Programmer - |
- | SCB Computer Technology Inc - czhower@eastman.com |
- |Physically in Church Hill, TN - Logically Not Sure |
- | **** My Opinions are my own, I don't steal them **** |
- +------------------------------------------------------------+
- >>SQUID - The ultimate database reader, and NO limits. #$737961
- **Special Compile: 1.033B (Beta)
-